home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / math.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  7.8 KB  |  141 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1998 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'Math.pas' rev: 3.00
  6.  
  7. #ifndef MathHPP
  8. #define MathHPP
  9. #include <SysUtils.hpp>
  10. #include <SysInit.hpp>
  11. #include <System.hpp>
  12.  
  13. //-- user supplied -----------------------------------------------------------
  14.  
  15. namespace Math
  16. {
  17. //-- type declarations -------------------------------------------------------
  18. enum TPaymentTime { ptEndOfPeriod, ptStartOfPeriod };
  19.  
  20. class DELPHICLASS EInvalidArgument;
  21. class PASCALIMPLEMENTATION EInvalidArgument : public Sysutils::EMathError 
  22. {
  23.     typedef Sysutils::EMathError inherited;
  24.     
  25. public:
  26.     /* Exception.Create */ __fastcall EInvalidArgument(const System::AnsiString Msg) : Sysutils::EMathError(
  27.         Msg) { }
  28.     /* Exception.CreateFmt */ __fastcall EInvalidArgument(const System::AnsiString Msg, const System::TVarRec 
  29.         * Args, const int Args_Size) : Sysutils::EMathError(Msg, Args, Args_Size) { }
  30.     /* Exception.CreateRes */ __fastcall EInvalidArgument(int Ident, Extended Dummy) : Sysutils::EMathError(
  31.         Ident, Dummy) { }
  32.     /* Exception.CreateResFmt */ __fastcall EInvalidArgument(int Ident, const System::TVarRec * Args, const 
  33.         int Args_Size) : Sysutils::EMathError(Ident, Args, Args_Size) { }
  34.     /* Exception.CreateHelp */ __fastcall EInvalidArgument(const System::AnsiString Msg, int AHelpContext
  35.         ) : Sysutils::EMathError(Msg, AHelpContext) { }
  36.     /* Exception.CreateFmtHelp */ __fastcall EInvalidArgument(const System::AnsiString Msg, const System::TVarRec 
  37.         * Args, const int Args_Size, int AHelpContext) : Sysutils::EMathError(Msg, Args, Args_Size, AHelpContext
  38.         ) { }
  39.     /* Exception.CreateResHelp */ __fastcall EInvalidArgument(int Ident, int AHelpContext) : Sysutils::
  40.         EMathError(Ident, AHelpContext) { }
  41.     /* Exception.CreateResFmtHelp */ __fastcall EInvalidArgument(int Ident, const System::TVarRec * Args
  42.         , const int Args_Size, int AHelpContext) : Sysutils::EMathError(Ident, Args, Args_Size, AHelpContext
  43.         ) { }
  44.     
  45. public:
  46.     /* TObject.Destroy */ __fastcall virtual ~EInvalidArgument(void) { }
  47.     
  48. };
  49.  
  50. //-- var, const, procedure ---------------------------------------------------
  51. #define MinSingle  (1.500000E-45)
  52. #define MaxSingle  (3.400000E+38)
  53. #define MinDouble  (5.000000E-324)
  54. #define MaxDouble  (1.700000E+308)
  55. #define MinExtended  (3.400000E-4932)
  56. #define MaxExtended  (1.100000E+4932)
  57. #define MinComp  (-9.223372E+18)
  58. #define MaxComp  (9.223372E+18)
  59. extern PACKAGE Extended __fastcall DegToRad(Extended Degrees);
  60. extern PACKAGE Extended __fastcall RadToDeg(Extended Radians);
  61. extern PACKAGE Extended __fastcall GradToRad(Extended Grads);
  62. extern PACKAGE Extended __fastcall RadToGrad(Extended Radians);
  63. extern PACKAGE Extended __fastcall CycleToRad(Extended Cycles);
  64. extern PACKAGE Extended __fastcall RadToCycle(Extended Radians);
  65. extern PACKAGE Extended __fastcall LnXP1(Extended X);
  66. extern PACKAGE Extended __fastcall IntPower(Extended Base, int Exponent);
  67. extern PACKAGE Extended __fastcall ArcCos(Extended X);
  68. extern PACKAGE Extended __fastcall ArcSin(Extended X);
  69. extern PACKAGE Extended __fastcall ArcTan2(Extended Y, Extended X);
  70. extern PACKAGE Extended __fastcall Tan(Extended X);
  71. extern PACKAGE Extended __fastcall Cotan(Extended X);
  72. extern PACKAGE Extended __fastcall Hypot(Extended X, Extended Y);
  73. extern PACKAGE void __fastcall SinCos(Extended Theta, Extended &Sin, Extended &Cos);
  74. extern PACKAGE void __fastcall Frexp(Extended X, Extended &Mantissa, int &Exponent);
  75. extern PACKAGE Extended __fastcall Ldexp(Extended X, int P);
  76. extern PACKAGE int __fastcall Ceil(Extended X);
  77. extern PACKAGE int __fastcall Floor(Extended X);
  78. extern PACKAGE Extended __fastcall Log10(Extended X);
  79. extern PACKAGE Extended __fastcall Log2(Extended X);
  80. extern PACKAGE Extended __fastcall LogN(Extended Base, Extended X);
  81. extern PACKAGE Extended __fastcall Poly(Extended X, const double * Coefficients, const int Coefficients_Size
  82.     );
  83. extern PACKAGE Extended __fastcall Power(Extended Base, Extended Exponent);
  84. extern PACKAGE Extended __fastcall Cosh(Extended X);
  85. extern PACKAGE Extended __fastcall Sinh(Extended X);
  86. extern PACKAGE Extended __fastcall Tanh(Extended X);
  87. extern PACKAGE Extended __fastcall ArcCosh(Extended X);
  88. extern PACKAGE Extended __fastcall ArcSinh(Extended X);
  89. extern PACKAGE Extended __fastcall ArcTanh(Extended X);
  90. extern PACKAGE Extended __fastcall Mean(const double * Data, const int Data_Size);
  91. extern PACKAGE double __fastcall MinValue(const double * Data, const int Data_Size);
  92. extern PACKAGE int __fastcall MinIntValue(const int * Data, const int Data_Size);
  93. extern PACKAGE double __fastcall MaxValue(const double * Data, const int Data_Size);
  94. extern PACKAGE int __fastcall MaxIntValue(const int * Data, const int Data_Size);
  95. extern PACKAGE void __fastcall MeanAndStdDev(const double * Data, const int Data_Size, Extended &Mean
  96.     , Extended &StdDev);
  97. extern PACKAGE void __fastcall MomentSkewKurtosis(const double * Data, const int Data_Size, Extended 
  98.     &M1, Extended &M2, Extended &M3, Extended &M4, Extended &Skew, Extended &Kurtosis);
  99. extern PACKAGE Extended __fastcall Norm(const double * Data, const int Data_Size);
  100. extern PACKAGE Extended __fastcall PopnStdDev(const double * Data, const int Data_Size);
  101. extern PACKAGE Extended __fastcall PopnVariance(const double * Data, const int Data_Size);
  102. extern PACKAGE Extended __fastcall RandG(Extended Mean, Extended StdDev);
  103. extern PACKAGE Extended __fastcall StdDev(const double * Data, const int Data_Size);
  104. extern PACKAGE int __fastcall SumInt(const int * Data, const int Data_Size);
  105. extern PACKAGE Extended __fastcall Sum(const double * Data, const int Data_Size);
  106. extern PACKAGE Extended __fastcall SumOfSquares(const double * Data, const int Data_Size);
  107. extern PACKAGE void __fastcall SumsAndSquares(const double * Data, const int Data_Size, Extended &Sum
  108.     , Extended &SumOfSquares);
  109. extern PACKAGE Extended __fastcall TotalVariance(const double * Data, const int Data_Size);
  110. extern PACKAGE Extended __fastcall Variance(const double * Data, const int Data_Size);
  111. extern PACKAGE Extended __fastcall DoubleDecliningBalance(Extended Cost, Extended Salvage, int Life, 
  112.     int Period);
  113. extern PACKAGE Extended __fastcall SLNDepreciation(Extended Cost, Extended Salvage, int Life);
  114. extern PACKAGE Extended __fastcall SYDDepreciation(Extended Cost, Extended Salvage, int Life, int Period
  115.     );
  116. extern PACKAGE Extended __fastcall InternalRateOfReturn(Extended Guess, const double * CashFlows, const 
  117.     int CashFlows_Size);
  118. extern PACKAGE Extended __fastcall NetPresentValue(Extended Rate, const double * CashFlows, const int 
  119.     CashFlows_Size, TPaymentTime PaymentTime);
  120. extern PACKAGE Extended __fastcall FutureValue(Extended Rate, int NPeriods, Extended Payment, Extended 
  121.     PresentValue, TPaymentTime PaymentTime);
  122. extern PACKAGE Extended __fastcall InterestPayment(Extended Rate, int Period, int NPeriods, Extended 
  123.     PresentValue, Extended FutureValue, TPaymentTime PaymentTime);
  124. extern PACKAGE Extended __fastcall InterestRate(int NPeriods, Extended Payment, Extended PresentValue
  125.     , Extended FutureValue, TPaymentTime PaymentTime);
  126. extern PACKAGE Extended __fastcall NumberOfPeriods(Extended Rate, Extended Payment, Extended PresentValue
  127.     , Extended FutureValue, TPaymentTime PaymentTime);
  128. extern PACKAGE Extended __fastcall Payment(Extended Rate, int NPeriods, Extended PresentValue, Extended 
  129.     FutureValue, TPaymentTime PaymentTime);
  130. extern PACKAGE Extended __fastcall PeriodPayment(Extended Rate, int Period, int NPeriods, Extended PresentValue
  131.     , Extended FutureValue, TPaymentTime PaymentTime);
  132. extern PACKAGE Extended __fastcall PresentValue(Extended Rate, int NPeriods, Extended Payment, Extended 
  133.     FutureValue, TPaymentTime PaymentTime);
  134.  
  135. }    /* namespace Math */
  136. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  137. using namespace Math;
  138. #endif
  139. //-- end unit ----------------------------------------------------------------
  140. #endif    // Math
  141.